Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: Telephony /
Chapter 4 - Call Appearances


Call Appearance Summary

C Summary

Constants

Call Appearance States

enum {
   telCAIdleState                 = 0,
   telCAInUseState                = 1,
   telCAOfferState                = 2,
   telCAQueuedState               = 3,
   telCAAlertingState             = 4,
   telCADialToneState             = 5,
   telCADialingState              = 6,
   telCAWaitingState              = 7,
   telCARingingState              = 8,
   telCABusyState                 = 9,
   telCAHeldState                 = 10,
   telCAConferencedState          = 11,
   telCAActiveState               = 12,
   telCAReorderState              = 13,
   telCAConferencedHeldState      = 14,
   telCAUnknownState              = 15
};

Call Types

enum {
   telVoiceMailAccessOut          = (-7),
   telPageOut                     = (-6),
   telIntercomOut                 = (-5),
   telCallbackOut                 = (-4),
   telPickup                      = (-3),
   telParkRetrieve                = (-2),
   telNormalOut                   = (-1),
   telUnknownCallType             = 0,
   telNormalIn                    = 1,
   telForwardedImmediate          = 2,
   telForwardedBusy               = 3,
   telForwardedNoAnswer           = 4,
   telTransfer                    = 5,
   telDeflected                   = 6,
   telIntercepted                 = 7,
   telDeflectRecall               = 8,
   telParkRecall                  = 9,
   telTransferredRecall           = 10,
   telIntercomIn                  = 11,
   telCallbackIn                  = 12
};

Call Origination Types

enum {
   telInternalCall                = 0,
   telExternalCall                = 1,
   telUnknownCallOrigin           = 2,
   telAllCallOrigins              = 2
};

Dial Types

enum {
   telDNDialable                  = 0,
   telDNNorthAmerican             = 1,
   telDNInternational             = 2,
   telDNAlmostDialable            = 3,
   telDNUnknown                   = 15
};

Call Appearance Feature Flags

enum {
   holdSub                        = 1L << 0,
   holdAvail                      = 1L << 1,
   holdActive                     = 1L << 2,
   conferenceSub                  = 1L << 3,
   conferenceAvail                = 1L << 4,
   conferenceActive               = 1L << 5,
   conferenceDropSub              = 1L << 6,
   conferenceDropAvail            = 1L << 7,
   conferenceSplitSub             = 1L << 8,
   conferenceSplitAvail           = 1L << 9,
   numToConferenceRequired        = 1L << 10,
   transferSub                    = 1L << 11,
   transferAvail                  = 1L << 12,
   transferActive                 = 1L << 13,
   caRelated                      = 1L << 14
};

Other Call Appearance Feature Flags

enum {
   callbackSub                    = 1L << 0,
   callbackAvail                  = 1L << 1,
   callbackActive                 = 1L << 2,
   callbackClearSub               = 1L << 3,
   callbackNowSub                 = 1L << 4,
   callbackNowAvail               = 1L << 5,
   callbackBusy                   = 1L << 6,
   callbackNoAnswer               = 1L << 7,
   callbackReturnsRef             = 1L << 8,
   parkSub                        = 1L << 9,
   parkAvail                      = 1L << 10,
   parkActive                     = 1L << 11,
   parkRetrieveSub                = 1L << 12,
   parkRetrieveWithID             = 1L << 13,
   parkWithReturnedID             = 1L << 14,
   parkWithGivenID                = 1L << 18,
   rejectable                     = 1L << 15,
   deflectable                    = 1L << 16,
   acceptable                     = 1L << 17,
   voiceDetected                  = 1L << 19,
   callAnswdTSRings               = 1L << 20,
   progressHasDuration            = 1L << 21
};

Data Types

typedef unsigned long             TELCAFeatureFlags;
typedef unsigned long             TELCAOtherFeatures;

Call Appearance Structure

struct TELCARecord {
   short                          caRef;
   TELDNHandle                    hTELDN;
   TELHandle                      hTEL;
   short                          caState;
   TELCAHandle                    relatedCA;
   long                           connectTime;
   short                          intExt;
   short                          callType;
   short                          dialType;
   short                          bearerType;
   short                          rate;
   StringPtr                      rmtDN;
   StringPtr                      rmtPartyName;
   StringPtr                      rmtSubaddress;
   StringPtr                      routeDN;
   StringPtr                      routePartyName;
   StringPtr                      routeSubaddress;
   short                          priority;
   short                          conferenceLimit;
   TELCAFeatureFlags              featureFlags;
   TELCAOtherFeatures             otherFeatures;
   long                           telCAPrivate;
   long                           refCon;
   long                           userData;
   long                           reserved;
};
typedef struct TELCARecord TELCARecord;
typedef TELCARecord *TELCAPtr, **TELCAHandle;

Call Appearance Functions

Placing an Outgoing Call

pascal TELErr TELSetupCall       (TELDNHandle hTELDN, 
                                  TELCAHandle *hTELCA, 
                                  ConstStr255Param destDN, 
                                  ConstStr255Param destName, 
                                  ConstStr255Param destSubaddress, 
                                  ConstStr255Param userUserInfo, 
                                  short bearerType, 
                                  short rate);
pascal TELErr TELConnect         (TELCAHandle hTELCA);
pascal TELErr TELDialDigits      (TELCAHandle hTELCA, ConstStr255Param digits);

Accepting and Answering an Incoming Call

pascal TELErr TELAcceptCall      (TELCAHandle hTELCA);
pascal TELErr TELAnswerCall      (TELCAHandle hTELCA);

Rejecting and Deflecting an Incoming Call

pascal TELErr TELRejectCall      (TELCAHandle hTELCA, short reason);
pascal TELErr TELDeflectCall     (TELCAHandle hTELCA, 
                                  ConstStr255Param rmtDN, 
                                  ConstStr255Param rmtName, 
                                  ConstStr255Param rmtSubaddress);

Dropping a Call

pascal TELErr TELDrop            (TELCAHandle hTELCA, ConstStr255Param userUserInfo);

Holding and Retrieving a Call

pascal TELErr TELHold            (TELCAHandle hTELCA);
pascal TELErr TELRetrieve        (TELCAHandle hTELCA);

Transferring a Call

pascal TELErr TELTransferPrep    (TELCAHandle hTELCA1, TELCAHandle hTELCA2);
pascal TELErr TELTransferEstablish(TELCAHandle hTELCA1, TELCAHandle hTELCA2);
pascal TELErr TELTransferBlind   (TELCAHandle hTELCA, 
                                  ConstStr255Param rmtDN, 
                                  ConstStr255Param rmtName, 
                                  ConstStr255Param rmtSubaddress);

Conferencing a Call

pascal TELErr TELConferencePrep  (TELCAHandle hTELCA1, 
                                  TELCAHandle hTELCA2, 
                                  short numToConference);
pascal TELErr TELConferenceEstablish (
                                  TELCAHandle hTELCA1, 
                                  TELCAHandle hTELCA2);
pascal TELErr TELConferenceSplit (TELCAHandle hTELCA);

Calling Back an Unavailable Party

pascal TELErr TELCallbackSet     (TELCAHandle hTELCA, short *callbackRef);
pascal TELErr TELCallbackNow     (TELCAHandle hTELCA, short callbackRef);
pascal TELErr TELCallbackClear   (TELHandle hTEL, short callbackRef);

Parking and Picking Up Calls

pascal TELErr TELParkCall        (TELCAHandle hTELCA, 
                                  StringPtr *parkRetrieveID, 
                                  ConstStr255Param parkID);
pascal TELErr TELRetrieveParkedCall (
                                  TELCAHandle hTELCA, 
                                  ConstStr255Param parkRetrieveID);
pascal TELErr TELCallPickup      (TELCAHandle hTELCA, 
                                  ConstStr255Param pickupDN, 
                                  short pickupGroupID);

Using Voice Mail, Paging, and Intercom Features

pascal TELErr TELVoiceMailAccess (TELCAHandle hTELCA);
pascal TELErr TELPaging          (TELCAHandle hTELCA, short pageID);
pascal TELErr TELIntercom        (TELCAHandle hTELCA, short intercomID);

Detecting Voice and Silence

pascal TELErr TELCAVoiceDetect   (TELCAHandle hTELCA, Boolean VoiceDetectOn);
pascal TELErr TELCASilenceDetect (TELCAHandle hTELCA, Boolean DetectOn, long Period);

Disposing of a Call Appearance

pascal TELErr TELCADispose       (TELCAHandle hTELCA);

Getting Information About Call Appearances

pascal TELErr TELGetCAInfo       (TELCAHandle hTELCA);
pascal TELErr TELGetCAState      (TELCAHandle hTELCA, short *state);
pascal TELErr TELGetCAFlags      (TELCAHandle hTELCA, 
                                  long *caFeatureFlags, 
                                  long *caOtherFeatures);
pascal short TELCountCAs         (TELDNHandle hTELDN, short internalExternal);
pascal TELErr TELCALookup        (TELDNHandle hTELDN, 
                                  short internalExternal, 
                                  short index, 
                                  TELCAHandle *hTELCA);

Pascal Summary

Constants

Call Appearance States

CONST
   telCAIdleState                 = 0;
   telCAInUseState                = 1;
   telCAOfferState                = 2;
   telCAQueuedState               = 3;
   telCAAlertingState             = 4;
   telCADialToneState             = 5;
   telCADialingState              = 6;
   telCAWaitingState              = 7;
   telCARingingState              = 8;
   telCABusyState                 = 9;
   telCAHeldState                 = 10;
   telCAConferencedState          = 11;
   telCAActiveState               = 12;
   telCAReorderState              = 13;
   telCAConferencedHeldState      = 14;
   telCAUnknownState              = 15;

Call Types

CONST
   telVoiceMailAccessOut          = (-7);
   telPageOut                     = (-6);
   telIntercomOut                 = (-5);
   telCallbackOut                 = (-4);
   telPickup                      = (-3);
   telParkRetrieve                = (-2);
   telNormalOut                   = (-1);
   telUnknownCallType             = 0;
   telNormalIn                    = 1;
   telForwardedImmediate          = 2;
   telForwardedBusy               = 3;
   telForwardedNoAnswer           = 4;
   telTransfer                    = 5;
   telDeflected                   = 6;
   telIntercepted                 = 7;
   telDeflectRecall               = 8;
   telParkRecall                  = 9;
   telTransferRecall              = 10;
   telIntercomIn                  = 11;
   telCallback                    = 12;

Call Origination Types

CONST
   telInternalCall                = 0;
   telExternalCall                = 1;
   telUnknownCallOrigin           = 2;
   telAllCallOrigins              = 2;

Dial Types

CONST
   telDNDialable                  = 0;
   telDNNorthAmerican             = 1;
   telDNInternational             = 2;
   telDNAlmostDialable            = 3;
   telDNUnknown                   = 15;

Call Appearance Feature Flags

CONST
   holdSub                        = $00000001;
   holdAvail                      = $00000002;
   holdActive                     = $00000004;
   conferenceSub                  = $00000008;
   conferenceAvail                = $00000010;
   conferenceActive               = $00000020;
   conferenceDropSub              = $00000040;
   conferenceDropAvail            = $00000080;
   conferenceSplitSub             = $00000100;
   conferenceSplitAvail           = $00000200;
   numToConferenceRequired        = $00000400;
   transferSub                    = $00000800;
   transferAvail                  = $00001000;
   transferActive                 = $00002000;
   caRelated                      = $00004000;

Other Call Appearance Feature Flags

CONST
   callbackSub                    = $00000001;
   callbackAvail                  = $00000002;
   callbackActive                 = $00000004;
   callbackClearSub               = $00000008;
   callbackNowSub                 = $00000010;
   callbackNowAvail               = $00000020;
   callbackBusy                   = $00000040;
   callbackNoAnswer               = $00000080;
   callbackReturnsRef             = $00000100;
   parkSub                        = $00000200;
   parkAvail                      = $00000400;
   parkActive                     = $00000800;
   parkRetrieveSub                = $00001000;
   parkRetrieveWithID             = $00002000;
   parkWithReturnedID             = $00004000;
   parkWithGivenID                = $00040000;
   rejectable                     = $00008000;
   deflectable                    = $00010000;
   acceptable                     = $00020000;
   voiceDetected                  = $00080000;
   callAnswdTSRings               = $00100000;
   progressHasDuration            = $00200000;

Data Types

TYPE
   TELCAFeatureFlags              = LongInt;
   TELCAOtherFeatures             = LongInt;

Call Appearance Structure

   TELCARecord = 
   RECORD
      caRef:                      Integer;
      hTELDN:                     TELDNHandle;
      hTEL:                       TELHandle;
      caState:                    Integer;
      relatedCA:                  TELCAHandle;
      connectTime:                LongInt;
      intExt:                     Integer;
      callType:                   Integer;
      dialType:                   Integer;
      bearerType:                 Integer;
      rate:                       Integer;
      rmtDN:                      StringPtr;
      rmtPartyName:               StringPtr;
      rmtSubaddress:              StringPtr;
      routeDN:                    StringPtr;
      routePartyName:             StringPtr;
      routeSubaddress:            StringPtr;
      priority:                   Integer;
      conferenceLimit:            Integer; 
      featureFlags:               TELCAFeatureFlags;
      otherFeatures:              TELCAOtherFeatures;
      telCAPrivate:               LongInt;
      refCon:                     LongInt;
      userData:                   LongInt;
      reserved:                   LongInt;
   END;
   TELCAHandle                    = ^TELCAPtr;
   TELCAPtr                       = ^TELCARecord;

Call Appearance Functions

Placing an Outgoing Call

FUNCTION TELSetupCall            (hTELDN: TELDNHandle; 
                                  VAR hTELCA: TELCAHandle; 
                                  destDN, destName, destSubaddr, userUserInfo: Str255; 
                                  bearerType: Integer; 
                                  rate: Integer): TELErr;
FUNCTION TELConnect              (hTELCA: TELCAHandle): TELErr;
FUNCTION TELDialDigits           (hTELCA: TELCAHandle; digits: Str255): TELErr;

Accepting and Answering an Incoming Call

FUNCTION TELAcceptCall           (hTELCA: TELCAHandle): TELErr;
FUNCTION TELAnswerCall           (hTELCA: TELCAHandle): TELErr;

Rejecting and Deflecting an Incoming Call

FUNCTION TELRejectCall           (hTELCA: TELCAHandle; reason: Integer): TELErr;
FUNCTION TELDeflectCall          (hTELCA: TELCAHandle; 
                                  rmtDN, rmtName, rmtSubaddress: Str255): TELErr;

Dropping a Call

FUNCTION TELDrop                 (hTELCA: TELCAHandle; userUserInfo:Str255): TELErr;

Holding and Retrieving a Call

FUNCTION TELHold                 (hTELCA: TELCAHandle): TELErr;
FUNCTION TELRetrieve             (hTELCA: TELCAHandle): TELErr;

Transferring a Call

FUNCTION TELTransferPrep         (hTELCA1: TELCAHandle; hTELCA2: TELCAHandle): TELErr;
FUNCTION TELTransferEstablish    (hTELCA1: TELCAHandle; hTELCA2: TELCAHandle): TELErr;
FUNCTION TELTransferBlind        (hTELCA1: TELCAHandle; 
                                  rmtDN: Str255; 
                                  rmtName: Str255; 
                                  rmtSubaddress: Str255): TELErr;

Conferencing a Call

FUNCTION TELConferencePrep       (hTELCA1: TELCAHandle; 
                                  hTELCA2: TELCAHandle; 
                                  numToConference: Integer): TELErr;
FUNCTION TELConferenceEstablish  (hTELCA1: TELCAHandle; hTELCA2: TELCAHandle): TELErr;
FUNCTION TELConferenceSplit      (hTELCA: TELCAHandle): TELErr;

Calling Back an Unavailable Party

FUNCTION TELCallbackSet          (hTELCA: TELCAHandle; VAR callbackRef: Integer): 
                                  TELErr;
FUNCTION TELCallbackClear        (hTEL: TELHandle; callbackRef: Integer): TELErr;
FUNCTION TELCallbackNow          (hTELCA: TELCAHandle; callbackRef: Integer): TELErr;

Parking and Picking Up Calls

FUNCTION TELParkCall             (hTELCA: TELCAHandle; 
                                  VAR parkRetrieveID: StringPtr; 
                                  parkID: Str255): TELErr;
FUNCTION TELRetrieveParkedCall   (hTELCA: TELCAHandle; parkRetrieveID:Str255): TELErr;
FUNCTION TELCallPickup           (hTELCA: TELCAHandle; 
                                  pickupDN: Str255; 
                                  pickupGroupID: Integer): TELErr;

Using Voice Mail, Paging, and Intercom Features

FUNCTION TELVoiceMailAccess      (hTELCA: TELCAHandle): TELErr;
FUNCTION TELPaging               (hTELCA: TELCAHandle; pageID: Integer): TELErr;
FUNCTION TELIntercom             (hTELCA: TELCAHandle; intercomID: Integer): TELErr;

Detecting Voice and Silence

FUNCTION TELCAVoiceDetect        (hTELCA: TELCAHandle; 
                                  VoiceDetectOn: Boolean): TELErr;
FUNCTION TELCASilenceDetect      (hTELCA: TELCAHandle; 
                                  DetectOn: Boolean; 
                                  Period: LongInt): TELErr;

Disposing of a Call Appearance

FUNCTION TELCADispose            (hTELCA: TELCAHandle): TELErr;

Getting Information About Call Appearances

FUNCTION TELGetCAInfo            (hTELCA: TELCAHandle): TELErr;
FUNCTION TELGetCAState           (hTELCA: TELCAHandle; VAR state: Integer): TELErr;
FUNCTION TELGetCAFlags           (hTELCA: TELCAHandle; 
                                  VAR caFeatureFlags: LongInt; 
                                  VAR caOtherFeatures: LongInt): TELErr;
FUNCTION TELCountCAs             (hTELDN: TELDNHandle; internalExternal: Integer): 
                                  Integer;
FUNCTION TELCALookup             (hTELDN: TELDNHandle;
                                  internalExternal: Integer; 
                                  index: Integer; 
                                  VAR hTELCA: TELCAHandle): TELErr;


Previous Book Contents Book Index Next

© Apple Computer, Inc.
13 DEC 1996



Navigation graphic, see text links

Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help